.class public Lcom/xingbook/huiben/playitem/HuibenPlayService;
.super Landroid/app/Service;

# interfaces
.implements Landroid/media/MediaPlayer$OnCompletionListener;
.implements Landroid/media/MediaPlayer$OnErrorListener;
.implements Landroid/media/MediaPlayer$OnPreparedListener;
.implements Lcom/xingbook/ting/play/c;


# static fields
.field public static o:Lcom/xingbook/huiben/playitem/HuibenPlayService;


# instance fields
.field a:Landroid/media/MediaPlayer;

.field b:Lcom/xingbook/ting/play/a;

.field c:Lcom/xingbook/huiben/playitem/c;

.field d:Lcom/xingbook/huiben/playitem/b;

.field e:Lcom/xingbook/huiben/playitem/a;

.field f:Z

.field g:Landroid/net/wifi/WifiManager$WifiLock;

.field final h:I

.field final i:I

.field j:Landroid/graphics/Bitmap;

.field k:Landroid/content/ComponentName;

.field l:Landroid/media/AudioManager;

.field m:Landroid/app/NotificationManager;

.field n:Z

.field private p:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->o:Lcom/xingbook/huiben/playitem/HuibenPlayService;

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    const/4 v0, 0x0

    const/4 v1, 0x0

    invoke-direct {p0}, Landroid/app/Service;-><init>()V

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b:Lcom/xingbook/ting/play/a;

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v0, Lcom/xingbook/huiben/playitem/b;->a:Lcom/xingbook/huiben/playitem/b;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->d:Lcom/xingbook/huiben/playitem/b;

    sget-object v0, Lcom/xingbook/huiben/playitem/a;->a:Lcom/xingbook/huiben/playitem/a;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    iput-boolean v1, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->f:Z

    const/16 v0, 0x2329

    iput v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->h:I

    const/16 v0, 0x232a

    iput v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->i:I

    iput-boolean v1, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->n:Z

    iput v1, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->p:I

    return-void
.end method

.method private a(Lcom/xingbook/huiben/playitem/c;)V
    .locals 2

    iput-object p1, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    new-instance v0, Landroid/content/Intent;

    const-string v1, "com.xingpark.huiben.play.musicservice.action.ACTION_STATECHANGE"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v1, "state"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->sendBroadcast(Landroid/content/Intent;)V

    return-void
.end method


# virtual methods
.method a()V
    .locals 3

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    if-nez v0, :cond_0

    new-instance v0, Landroid/media/MediaPlayer;

    invoke-direct {v0}, Landroid/media/MediaPlayer;-><init>()V

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/media/MediaPlayer;->setWakeMode(Landroid/content/Context;I)V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnPreparedListener(Landroid/media/MediaPlayer$OnPreparedListener;)V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnErrorListener(Landroid/media/MediaPlayer$OnErrorListener;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->reset()V

    goto :goto_0
.end method

.method a(Landroid/content/Intent;)V
    .locals 2

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->f()V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    if-ne v0, v1, :cond_1

    const-string v0, "url"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Ljava/lang/String;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->d:Lcom/xingbook/huiben/playitem/c;

    if-ne v0, v1, :cond_0

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e()V

    goto :goto_0
.end method

.method a(Ljava/lang/String;)V
    .locals 4

    const/4 v0, 0x0

    const/4 v1, 0x1

    if-eqz p1, :cond_0

    const-string v2, ""

    invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_2

    :cond_0
    sget-object v0, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    invoke-virtual {p0, v1}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Z)V

    invoke-virtual {p0, v1}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Z)V

    :cond_1
    :goto_0
    return-void

    :cond_2
    sget-object v2, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v2}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Z)V

    :try_start_0
    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a()V

    iget-object v2, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    const/4 v3, 0x3

    invoke-virtual {v2, v3}, Landroid/media/MediaPlayer;->setAudioStreamType(I)V

    iget-object v2, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v2, p1}, Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;)V

    const-string v2, "http:"

    invoke-virtual {p1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_3

    const-string v2, "https:"

    invoke-virtual {p1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_3

    :goto_1
    iput-boolean v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->f:Z

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->b:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepareAsync()V

    iget-boolean v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->f:Z

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->g:Landroid/net/wifi/WifiManager$WifiLock;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager$WifiLock;->acquire()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0

    :cond_3
    move v0, v1

    goto :goto_1

    :cond_4
    :try_start_1
    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->g:Landroid/net/wifi/WifiManager$WifiLock;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager$WifiLock;->isHeld()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->g:Landroid/net/wifi/WifiManager$WifiLock;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager$WifiLock;->release()V
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method

.method a(Z)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->d:Lcom/xingbook/huiben/playitem/c;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->b:Lcom/xingbook/huiben/playitem/c;

    if-eq v0, v1, :cond_0

    if-eqz p1, :cond_1

    :cond_0
    sget-object v0, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Z)V

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->d()V

    :cond_1
    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->stopSelf()V

    return-void
.end method

.method b()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    if-ne v0, v1, :cond_0

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->d:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Z)V

    :cond_0
    return-void
.end method

.method b(Landroid/content/Intent;)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->d:Lcom/xingbook/huiben/playitem/c;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    if-ne v0, v1, :cond_1

    :cond_0
    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->f()V

    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "url"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Ljava/lang/String;)V

    :cond_1
    return-void
.end method

.method b(Z)V
    .locals 1

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->stopForeground(Z)V

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->reset()V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->release()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    :cond_0
    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->g:Landroid/net/wifi/WifiManager$WifiLock;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager$WifiLock;->isHeld()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->g:Landroid/net/wifi/WifiManager$WifiLock;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager$WifiLock;->release()V

    :cond_1
    return-void
.end method

.method c()V
    .locals 1

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Z)V

    return-void
.end method

.method public c(Z)V
    .locals 1

    if-eqz p1, :cond_1

    sget-object v0, Lcom/xingbook/huiben/playitem/a;->b:Lcom/xingbook/huiben/playitem/a;

    :goto_0
    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e()V

    :cond_0
    return-void

    :cond_1
    sget-object v0, Lcom/xingbook/huiben/playitem/a;->a:Lcom/xingbook/huiben/playitem/a;

    goto :goto_0
.end method

.method d()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    sget-object v1, Lcom/xingbook/huiben/playitem/a;->c:Lcom/xingbook/huiben/playitem/a;

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b:Lcom/xingbook/ting/play/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b:Lcom/xingbook/ting/play/a;

    invoke-virtual {v0}, Lcom/xingbook/ting/play/a;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    sget-object v0, Lcom/xingbook/huiben/playitem/a;->a:Lcom/xingbook/huiben/playitem/a;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    :cond_0
    return-void
.end method

.method e()V
    .locals 4

    const/high16 v3, 0x3f80

    const v2, 0x3dcccccd

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    sget-object v1, Lcom/xingbook/huiben/playitem/a;->a:Lcom/xingbook/huiben/playitem/a;

    if-ne v0, v1, :cond_1

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    sget-object v1, Lcom/xingbook/huiben/playitem/a;->b:Lcom/xingbook/huiben/playitem/a;

    if-ne v0, v1, :cond_2

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, v2, v2}, Landroid/media/MediaPlayer;->setVolume(FF)V

    :goto_1
    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->start()V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, v3, v3}, Landroid/media/MediaPlayer;->setVolume(FF)V

    goto :goto_1
.end method

.method f()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    sget-object v1, Lcom/xingbook/huiben/playitem/a;->c:Lcom/xingbook/huiben/playitem/a;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b:Lcom/xingbook/ting/play/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b:Lcom/xingbook/ting/play/a;

    invoke-virtual {v0}, Lcom/xingbook/ting/play/a;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    sget-object v0, Lcom/xingbook/huiben/playitem/a;->c:Lcom/xingbook/huiben/playitem/a;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    :cond_0
    return-void
.end method

.method public g()V
    .locals 2

    sget-object v0, Lcom/xingbook/huiben/playitem/a;->c:Lcom/xingbook/huiben/playitem/a;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    if-ne v0, v1, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e()V

    :cond_0
    return-void
.end method

.method public h()Lcom/xingbook/huiben/playitem/c;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c:Lcom/xingbook/huiben/playitem/c;

    return-object v0
.end method

.method public i()Landroid/media/MediaPlayer;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    return-object v0
.end method

.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
    .locals 1

    const/4 v0, 0x0

    return-object v0
.end method

.method public onCompletion(Landroid/media/MediaPlayer;)V
    .locals 1

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->e:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    :try_start_0
    sget-object v0, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Z)V

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public onCreate()V
    .locals 3

    const/4 v2, 0x1

    iput-boolean v2, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->n:Z

    sput-object p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->o:Lcom/xingbook/huiben/playitem/HuibenPlayService;

    const-string v0, "wifi"

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    const-string v1, "mylock"

    invoke-virtual {v0, v2, v1}, Landroid/net/wifi/WifiManager;->createWifiLock(ILjava/lang/String;)Landroid/net/wifi/WifiManager$WifiLock;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->g:Landroid/net/wifi/WifiManager$WifiLock;

    const-string v0, "notification"

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->m:Landroid/app/NotificationManager;

    const-string v0, "audio"

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/media/AudioManager;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->l:Landroid/media/AudioManager;

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x8

    if-lt v0, v1, :cond_0

    new-instance v0, Lcom/xingbook/ting/play/a;

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1, p0}, Lcom/xingbook/ting/play/a;-><init>(Landroid/content/Context;Lcom/xingbook/ting/play/c;)V

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b:Lcom/xingbook/ting/play/a;

    :goto_0
    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0201b9

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;

    move-result-object v0

    invoke-static {v0}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->j:Landroid/graphics/Bitmap;

    new-instance v0, Landroid/content/ComponentName;

    const-class v1, Lcom/xingbook/ting/play/MusicIntentReceiver;

    invoke-direct {v0, p0, v1}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->k:Landroid/content/ComponentName;

    return-void

    :cond_0
    sget-object v0, Lcom/xingbook/huiben/playitem/a;->c:Lcom/xingbook/huiben/playitem/a;

    iput-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e:Lcom/xingbook/huiben/playitem/a;

    goto :goto_0
.end method

.method public onDestroy()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->o:Lcom/xingbook/huiben/playitem/HuibenPlayService;

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Z)V

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->d()V

    return-void
.end method

.method public onError(Landroid/media/MediaPlayer;II)Z
    .locals 4

    const/4 v3, 0x1

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "\u64ad\u653e\u51fa\u73b0\u9519\u8bef\uff0c\u8bf7\u7a0d\u7b49..."

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->a:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    invoke-virtual {p0, v3}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Z)V

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->d()V

    return v3
.end method

.method public onPrepared(Landroid/media/MediaPlayer;)V
    .locals 2

    sget-object v0, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    invoke-direct {p0, v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Lcom/xingbook/huiben/playitem/c;)V

    iget-object v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a:Landroid/media/MediaPlayer;

    iget v1, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->p:I

    invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->seekTo(I)V

    const/4 v0, 0x0

    iput v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->p:I

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->e()V

    return-void
.end method

.method public onStartCommand(Landroid/content/Intent;II)I
    .locals 3

    const/4 v2, 0x0

    invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    iput v2, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->p:I

    const-string v1, "com.111.xingpark.huiben.play.musicservice.action.STOP"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-boolean v1, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->n:Z

    if-eqz v1, :cond_0

    iput-boolean v2, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->n:Z

    :cond_0
    const-string v1, "com.111.xingpark.huiben.play.musicservice.action.PLAY"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    const-string v0, "seek"

    invoke-virtual {p1, v0, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->p:I

    invoke-virtual {p0, p1}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->a(Landroid/content/Intent;)V

    :cond_1
    :goto_0
    const/4 v0, 0x2

    return v0

    :cond_2
    const-string v1, "com.111.xingpark.huiben.play.musicservice.action.PAUSE"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_3

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b()V

    goto :goto_0

    :cond_3
    const-string v1, "com.111.xingpark.huiben.play.musicservice.action.STOP"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_4

    invoke-virtual {p0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->c()V

    goto :goto_0

    :cond_4
    const-string v1, "com.111.xingpark.huiben.play.musicservice.action.ACTION_PLAYURL"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    const-string v0, "seek"

    invoke-virtual {p1, v0, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->p:I

    invoke-virtual {p0, p1}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->b(Landroid/content/Intent;)V

    goto :goto_0
.end method
